**********************************
*******SCATTERPLOTS***************
**********************************

clear all
set matsize 800
set more off


use "${datapath}/fascism_db.dta", clear

**********************************
*****
local demo "lpop1911 lpop2 lpop3 lpop4 sh_pop_1911_be6"
local cntls_spec1 "lpop1911 lpop2 lpop3 lpop4 sh_pop_1911_be6 d_reg* province*"
local cntls_spec2 "`cntls_spec1' larea centre_alt max_alt"
local cntls_spec3 "`cntls_spec2' psu1913_vv"
local cntls_spec4 "`cntls_spec3' veterans74_95 veterans96_00 ard_vol_pop6m cruent_d army_suppliers_d"	
local cntls_spec5 "`cntls_spec4' dlab shcrop landlord_ass"
local cntls_spec6 "`cntls_spec5' ind_workers ind_firms literacy elites bourgeoisie"

***************
***FIG 3*******
***************
**first stage:
qui reg foots_pop6m `cntls_spec6'
predict resIV, residuals
qui reg psu1919_vv `cntls_spec6'
predict res_psu1919_vv, residuals
binscatter res_psu1919_vv resIV, nquantiles(44) yti(Socialist vote share 1919, size(medium)) xti(Footsoldier casualties in WWI, size(medium)) xscale(lcolor("black") fextend) yscale(lcolor("black") fextend ) plotregion(color(white)) xlab(-0.02(0.02)0.04, labsize(medium)) ylab(-0.05(0.05)0.06, nogrid labsize(medium))
graph export "${outpath}/fig2.png", width(4000) replace

drop resIV res_psu1919_vv

